// type 定义类型别名
type IdType = string | number|boolean
type PointType = {
    z: number,
    x: number,
    y?: number
}

function printId(id: IdType) {
    console.log(id)
}
function printPoint(point: PointType) {
    console.log(point.x)
}